<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
        <link rel="stylesheet" type="text/css" href="css/tabela.css" media="screen" />
        <script src="jscript/jquery-1.7.1.min.js" type="text/javascript"></script>
        <script src="jscript/jquery.tablesorter.min.js"></script>
        <script src="jscript/jquery.tablesorter.pager.js"></script>
        <script src="jscript/valida.js" type="text/javascript"></script>
        <script src="jscript/ListarCadastrados.js" type="text/javascript"></script>
    </head>
    <body>       
        <?php require_once 'classes/class.ConexaoBD.php';
        
        $ClsBD = new ConexaoBD;
        $strSQL = "SELECT DISTINCT Curso FROM cadastro";
        
        $Cursos = $ClsBD->ExecutarQry($strSQL, "S");
        ?>
        <div>
            <form id="parametros" name="parametros" method="post" onsubmit="return false;">
                <table>
                    <tr>                       
                        <td><span class="label"> Selecione o Curso: </span></td>
                        <td><select id="txtCurso" class="LinhaInput">
                        <?php 
                        if(is_resource($Cursos))
                            while($Linha = mysql_fetch_assoc($Cursos)) { 
                        ?>
                                <option value="<?php echo $Linha['Curso']; ?>">
                                    <?php echo $Linha['Curso']; ?>
                                </option>
                        <?php } ?>
                        </select></td>
                    </tr>
                    <tr>
                        <td><span class="label"> Data Inicial: </span></td>
                        <td><input type="text" id="txtDtIni" value="" size="30" OnKeyPress="formatar(this, '##/##/####')" class="LinhaInput" /><span>Ex: dd/mm/aaaa</span></td>
                    </tr>
                    <tr>
                        <td><span class="label"> Data Final: </span></td>
                        <td><input type="text" id="txtDtFim" value="" size="30" OnKeyPress="formatar(this, '##/##/####')" class="LinhaInput" /><span>Ex: dd/mm/aaaa</span></td>
                    <tr>
                        <td><span class="label"> Enviar E-Mail para não Matriculados?</span></td>
                        <td><input type="checkbox" id="chkEmail"></td>
                    </tr>
                </table>
            </form>
        </div>
        <div>
            <button id="consultar">Consultar</button>
        </div>
        <table id="tbCadastrados" class="tablesorter" style="visibility: hidden">
            <thead>
                <tr>
                    <th>Nome</th>
                    <!--<th>Sobrenome</th>-->
                    <th>CPF</th>
                    <th>NIP</th>
                    <th>OM</th>
                    <th>Posto/Graduação</th>
                    <th>Curso</th>
                    <th>Matricular</th>
                </tr>
           </thead>
           <tbody></tbody>
        </table>
        <br><br><br>
        <div>
            <span id="lblTurma" style="display: none;">Turma:</span>
            <input type="text" id="txtTurma" value ="" size="30" style="line-height: 26px; visibility: hidden" /><br>
            <button id="btnMatricular" style="line-height: 26px; visibility: hidden" >Matricular</button>
        </div>
        <div id="rodape"></div>
    </body>
</html>	